
var $;
var element;
var form;
var table;
var laydate;
var status;
var layer;
layui.use(['jquery','element','form','table','laydate','layer'],function () {
    $ = layui.$;
    element = layui.element;
    form = layui.form;
    table = layui.table;
    laydate = layui.laydate;
    layer = layui.layer;

    cancel = function cancel() {
        var layer = parent.layer;
        layer.close(layer.index);
    }
    var id = parent.getParentId();
    $.ajax({
        url:'/Department/getJsUserOn',
        dataType:'json',
        data:{"id":id},
        success:function (data) {
            data = data.data;
            console.log(data);
            $('.headPortrait > div > img').attr("src",data.acatarUrl);
            $('.headPortrait > p > span').text(data.trueName);

            form.val("formTest", {
                "account":data.account,
                "trueName":data.trueName,
                "idCard":data.idCard,
                "birthDate":data.birthDate,
                "registerIp":data.registerIp,
                "sex":data.sex,
                "phone":data.phone,
                "deptName":data.deptName,
                "registerDate":data.registerDate,
                "email":data.email,
                "freestyle":data.freestyle
            });
        }
    })


});
